package Main;

public class Try {
    static int b = 0;
    ThreadLocal<Integer> t = new ThreadLocal<>();
    public static void main(String[] args) {
        new Thread(new ThreadA()).start();
        new Thread(new ThreadB()).start();
    }

    static class ThreadA implements Runnable{

        @Override
        public void run() {
            for (;;)
                System.out.println(b);
        }
    }

    static class ThreadB implements Runnable{

        @Override
        public void run() {
            for (;;)
                b++;
        }
    }

}
